import request from '@/utils/request'

// 获取订单结算页
export const getCheckoutService = () => request.get('/member/order/pre')

// 修改收获地址
export const updateAddressService = (id, data) =>
  request.put(`/member/address/${id}`, data)

// 删除收获地址
export const deleteAddressService = (id) =>
  request.delete(`/member/address/${id}`)

// 添加收获
export const addAddressService = (data) => request.post('/member/address', data)

// 获取收获地址
export const getAddressListService = () => request.get('/member/address')

// 提交订单
export const submitOrderService = (data) => request.post('/member/order', data)

// 获取订单详情页
export const getOrderDetailService = (id) => request.get(`/member/order/${id}`)
